﻿#ifndef HOUSEMANAGE_H
#define HOUSEMANAGE_H

#include <QWidget>
#include "housemanagecontent.h"
#include "housemanageedit.h"
#include "globalvars.h"

namespace Ui {
class HouseManage;
}

class HouseManage : public QWidget
{
    Q_OBJECT
signals:
    void signalDeleteHouseType(const QString&);
    void signalSubmitHouseType();

public:
    explicit HouseManage(QWidget *parent = nullptr);
    ~HouseManage();

    void errorShow(const QString& msg);
    void setHouseList();
    void cleanHouseInfoList();

    void setHotelID(const QString &hotelID);
    QString getHotelID();
    void saveHouseImage(const QString& houseType,const QImage& image);
    void setSubmitHouseResult(bool result, const QString &msg);

public slots:
    void slotWatchHouseTypeInfo(const HouseInfo& houseInfo);

private slots:
    void on_pb_addHouse_clicked();

private:
    Ui::HouseManage *ui;

    int m_contentCount;
    QString m_hotelID;
    QVector<ImageList> m_houseImageVector;
    HouseManageEdit *m_houseEdit;
    QVector<HouseManageContent *> m_houseVector;
};

#endif // HOUSEMANAGE_H
